package com.lyc.controller;

import com.lyc.service.StockService;
import com.lyc.service.StockService02;
import com.lyc.service.StockService03;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：Xiaochen
 * @date ：Created in 2022/12/8 22:39
 * @description：
 * @modified By：
 * @version:
 */
@RestController
public class StockController {
    @Autowired
    private StockService03 stockService;

    //根据商品编号减库存
    @GetMapping("/incr/{productid}")
    public String incr(@PathVariable Integer productid){
        return stockService.decrement(productid);
    }
}